<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8" />
    <title>1.v-for</title>
    <!-- 引入Vue -->
    <script type="text/javascript" src="../../js/vue.js"></script>
  </head>
  <body>
    <!-- 准备好一个容器-->
    <div id="demo">
      <h2>人员列表</h2>
      <ul>
        <li v-for="(p,index) in persons" :key="p.id">
          {{p.name}}：{{p.description}} --- {{index}}
        </li>
      </ul>
    </div>

    <script type="text/javascript">
      new Vue({
        el:'#demo',
        data:{
          persons:[
            {id:'hfi7esytf8wh31',name:'晶哥',description:'红浪漫终身会员！'},
            {id:'hfi7esytf8wh32',name:'强哥',description:'抽烟只抽中华！'},
            {id:'hfi7esytf8wh33',name:'天禹',description:'这是一个照片骗子'}
          ]
        }
      })
    </script>
  </body>
</html>